package cn.szsys.integration.controller;

import cn.szsys.integration.config.SpringContextUtil;
import cn.szsys.integration.constants.Validation;
import cn.szsys.integration.dto.EducationVerifyDTO;
import cn.szsys.integration.dto.InvestmentDTO;
import cn.szsys.integration.helper.BusinessBeanNameConstant;
import cn.szsys.integration.helper.manager.AbstractForwardHandlerChainManager;
import cn.szsys.integration.helper.manager.EducationVerifyForwardHandlerChainManager;
import cn.szsys.integration.helper.manager.InvestmentForwardHandlerChainManager;
import cn.szsys.integration.util.R;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 学籍
 * @author Ryan
 * @since 2025-06-03
 **/
@RestController
@RequestMapping("education")
@RequiredArgsConstructor
public class EducationController {
    private final EducationVerifyForwardHandlerChainManager educationVerifyForwardHandlerChainManager;

    /**
     * 学籍核验
     *
     * @param dto dto
     * @return {@link R}
     * @author Ryan
     */
    @PostMapping("/verify")
    public R<?> verify(@Validated @RequestBody EducationVerifyDTO dto) {
        return educationVerifyForwardHandlerChainManager.handler(dto, BusinessBeanNameConstant.EducationVerify.TQSZ_EDUCATION_VERIFY_HANDLER_CHAIN);
    }

}
